<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>会员身份二维码</title>
    <link rel="stylesheet" type="text/css" href="../../../css/aui/aui.css" />
    <style>
        #app {
            width: 100vw;
            height: 100vh;
            background: url('../../../image/img/huiyuan_bg.png') no-repeat;
            background-size: cover;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-around;
            text-align: center;
        }

        .touxiang {
            width: 5rem;
            height: 5rem;
            border-radius: 50%;
            border: 0.2rem solid #fff;
            overflow: hidden;
        }

        .content {
            width: 90%;
            height: 10rem;
            box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.5);
            border-radius: 0.5rem;
            overflow: hidden;
            padding: 1rem 1.5rem;
            background: #fff;
            line-height: 2rem;
        }

        .row_flex {
            display: flex;
            align-items: center;
        }

        .logo {
            width: 20vw;
            height: 20vw;
        }

        .saoma {
            width: 35vw;
            height: 25vw;
            margin: 0 0.5rem;
        }

        .erweima {
            width: 30vw;
            height: 30vw;
        }

        .person_info_list {
            display: flex;
            align-items: center;
            position: relative;
        }

        .person_info_list:after {
            cursor: initial;
            content: '';
            position: absolute;
            width: 0.2rem;
            height: 2.2rem;
            background: #0689FB;
            left: 0.65rem;
        }

        .person_info_list img {
            width: 1.5rem;
            height: 1.5rem;
            border: 1px solid #0689FB;
            border-radius: 50%;
            padding: 0.2rem;
            margin-right: 0.5rem;
            background: #fff;
            position: relative;
            z-index: 10
        }

        .fanhui {
            position: absolute;
            left: 1rem;
            top: 2.5rem;
            background: rgba(0, 0, 0, 0);
            color: #fff;
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="aui-pull-left fanhui" onclick="close_w()">
            <span class="aui-iconfont aui-icon-left"></span>返回
        </div>
        <div style="margin-top:1rem;">
            <div class="touxiang"><img :src="userInfo.headimgurl" onerror='this.src="../../../image/portrait.png"' alt=""></div>
            <div style="color:#fff;">{{userInfo.nickname}}</div>
        </div>
        <div class="content">
            <div class="person_info_list">
                <img src="../../../image/icon/name.png" alt="">
                <div>姓名：{{userInfo.user_name}}</div>
            </div>
            <div class="person_info_list">
                <img src="../../../image/icon/shenfen.png" alt="">
                <div v-if="userInfo.user_type===1">身份：普通工人</div>
                <div v-else>身份：已认证工人</div>
            </div>
            <div class="person_info_list">
                <img src="../../../image/icon/bianhao.png" alt="">
                <div>会员编号：{{userInfo.user_tel}}</div>
            </div>
            <div class="person_info_list">
                <img src="../../../image/icon/tel.png" alt="">
                <div>联系方式：{{userInfo.user_tel}}</div>
            </div>
        </div>
        <div class="row_flex">
            <!-- <img class="saomaxiazai" src="../../../image/img/tiancheng.png" alt=""> -->
            <img class="logo" src="../../../image/my/logo.png" alt="">
            <img class="saoma" src="../../../image/my/saoma.png" alt="">
            <img class="erweima" :src="qrcode" alt="">
        </div>
    </div>
</body>
<script src="../../../script/api.js" charset="utf-8"></script>
<script src="../../../script/common/jquery-3.3.1.min.js" charset="utf-8"></script>
<script src="../../../script/common/common.js" charset="utf-8"></script>
<script src="../../../script/common/config.js" charset="utf-8"></script>
<script src="../../../script/common/vue.min.js" charset="utf-8"></script>
<script>
    apiready = function() {
        api.parseTapmode();
        vm.init();
    }

    var vm = new Vue({
        el: "#app",
        data: {
            userInfo: {},
            qrcode: ''
        },
        methods: {
            init() {
                this.userInfo = get_local("userInfo");
                this.getQrcode();
            },
            getQrcode() {
                var that = this;
                _ajax(Config.api.HomeQrcode, {}, function(ret) {
                    if (ret.code === 200) {
                        that.qrcode = ret.data.qrcode_url;
                    }
                });
            }
        }
    });
</script>

</html>
